<?php


namespace Gaoop\Bundle\ApiBundle\DependencyInjection;


use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\ConfigurationInterface;

class Configuration implements ConfigurationInterface
{
    /**
     * @inheritDoc
     */
    public function getConfigTreeBuilder()
    {
        $treeBuilder = new TreeBuilder('gaoop_api');

        $treeBuilder->getRootNode()
            ->children()
                ->arrayNode('exporter')
                    ->addDefaultsIfNotSet()
                    ->children()
                        ->scalarNode('authority_class')->defaultValue('gaoop-class')->example('app\\bundle\\controller::class')->end()
                        ->scalarNode('authority_method')->defaultValue('gaoop-method')->end()
                        ->scalarNode('validation_enum')->defaultValue('gaoop-validation-enum')->end()
                    ->end()
                ->end()
            ->end();

        return $treeBuilder;
    }
}